package com.flight.trans.adapter;

import android.content.Context;
import android.os.Build;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.RequiresApi;

import com.flight.trans.R;
import com.flight.trans.base.BaseRecyclerAdapter;
import com.flight.trans.base.BaseViewHolder;
import com.flight.trans.bean.EnterPortTakeDetailBean.EnterPortTakeDetailData;
import com.flight.trans.global.Constant;

import java.util.List;

/**
 * 出港提货
 */
public class EnterPortChannelingDetailsAdapter extends BaseRecyclerAdapter<EnterPortTakeDetailData> {

    public EnterPortChannelingDetailsAdapter(Context mContext, List<EnterPortTakeDetailData> mList) {
        super(mContext, mList);
    }

    @Override
    public int setContentView() {
        return R.layout.adapter_enter_channeling_details;
    }

    @RequiresApi(api = Build.VERSION_CODES.M)
    @Override
    protected void bindData(BaseViewHolder holder, EnterPortTakeDetailData data, int position) {
        TextView mTvOrderNo = holder.findViewById(R.id.mTvOrderNo);
        TextView mTvDestination = holder.findViewById(R.id.mTvDestination);
        TextView mTvProductName = holder.findViewById(R.id.mTvProductName);
        TextView mTvPicking = holder.findViewById(R.id.mTvPicking);
        TextView mTvOrderCount = holder.findViewById(R.id.mTvOrderCount);
        TextView mTvPickingCount = holder.findViewById(R.id.mTvPickingCount);

        mTvOrderNo.setText(data.getOrderNo());
        mTvDestination.setText(data.getOrap());
        mTvProductName.setText(data.getTradeName());
        mTvPicking.setText(data.getPackName());
        mTvOrderCount.setText(String.valueOf(data.getChargeNumber()));
        mTvPickingCount.setText(String.valueOf(data.getChargeNumber()));
    }
}
